package com.hzhjhh.view.manageView.menus.storage.enums;

import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 菜单栏初始化-仓库-进/退货-展示字段映射enum
 * 
 * @author 12083
 *
 */
@Getter
@AllArgsConstructor
public enum InReturnGoodsShowEnum {

	MERCHANDISE_CODE("merchandiseCode", "商品编号"),
	MERCHANDISE_NAME("merchandiseName", "商品名称"),
	NUM("num", "数量"),
	PURCHASE_PRICE("purchasePrice", "进货价"),
	DATE("date", "日期"),
	AMT("amt", "金额"),
	;
	
	/**
	 * 列对应的code
	 */
	private final String columnCode;
	/**
	 * 列展示时候的名称
	 */
	private final String columnName;
	
	public static Map<String, String> descMap() {
		return Arrays.asList(InReturnGoodsShowEnum.values())
				.stream()
				.collect(Collectors.toMap(InReturnGoodsShowEnum::getColumnName, InReturnGoodsShowEnum::getColumnCode, (v1, v2) -> v1));
	}
}
